Skip to content

feat(socratic-recovery): derive quality scenarios instead of blanket [OPEN]#499

Merged
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:feat/socratic-quality-scenarios-498
May 17, 2026
Merged

feat(socratic-recovery): derive quality scenarios instead of blanket [OPEN]#499
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:feat/socratic-quality-scenarios-498

Conversation

@raifdmueller

@raifdmueller raifdmueller commented May 17, 2026

Copy link
Copy Markdown
Contributor

Closes #498.

Problem

A recovery run reduced arc42 Chapter 10 (Quality Requirements) to two [OPEN] pointers, which an independent arc42 review graded RED. The Socratic process treated all of Quality as team-only knowledge.

It is not: quality-goal priority/ranking is team knowledge (Q4.9, [OPEN]); quality scenarios — what the system measurably does today — are usually code-derivable.

Fix

The mechanism/target split already existed as a "rule of thumb" in references/iso-25010.md, but nothing operative enforced it. Made it operative:

  • contract (Socratic Code-Theory Recovery: pin a fixed question-tree second level (contracts.json) #493) + phase-1 prompt — Q4 quality scenarios are [ANSWERED] where code shows measurable behaviour (timeouts, truncation limits, budgets, retry policies, the Q3.8 threats and test concept); only the ranking is [OPEN]; never invent a target number.
  • iso-25010.md — new section distinguishing a literal-threshold scenario (fully [ANSWERED], cite file:line) from a mechanism-only one (scenario derived, target value [OPEN]); explicit Q3.8 evidence reuse.
  • arc42.md — the Q3.10 row now defines the Q4 → Chapter 10 relationship.
  • phase-2-synthesize.md — Chapter 10 carve-out: synthesized from the [ANSWERED] Q4 scenarios plus the Q4.9 ranking, never just an [OPEN] pointer.
  • examples.md — added an [ANSWERED] quality-scenario leaf (a literal 3-second timeout) next to the existing mechanism/[OPEN]-target pair.

The anti-fabrication guard is explicit throughout: "derive scenarios" means reading measurable behaviour from code, never guessing plausible numbers.

Also fixed the German contract's stop-rule wording to match the EN one from the #497 CodeRabbit pass (was still "Stakeholder-Fakt").

Test plan

  • npm run build succeeds; /contracts, /brownfield render
  • llms.txt shows the updated socratic-code-theory-recovery contract
  • A recovery run now populates arc42 Chapter 10 with derived scenarios instead of an [OPEN] pointer

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Verbesserte Richtlinien für die Dokumentation von Qualitätsanforderungen aus Codeverhalten (Timeouts, Budgets, Retry-Policies).
    • Präzisere Anweisungen zur Markierung von Qualitätsszenarien als [ANSWERED] mit Quellenangaben (file:line) statt erfundener Zielwerte.
    • Klarstellung, dass nur die Qualitätsziel-Rangfolge (Q4.9) offen bleibt und arc42 Kapitel 10 aus analysierten Szenarien synthetisiert wird.

Review Change Stack

…[OPEN]

Closes LLM-Coding#498.

A recovery run reduced arc42 Chapter 10 (Quality Requirements) to two
[OPEN] pointers, which an independent arc42 review graded RED. The
Socratic process was treating all of Quality as team-only knowledge.

It is not. Quality-goal *priority/ranking* is team knowledge (Q4.9,
[OPEN]); quality *scenarios* — what the system measurably does today —
are usually code-derivable.

Made the split operative (it previously lived only as a "rule of thumb"
in references/iso-25010.md, with nothing enforcing it):

- contract (LLM-Coding#493) + phase-1 prompt: Q4 quality scenarios are [ANSWERED]
  where code shows measurable behaviour (timeouts, truncation limits,
  budgets, retry policies, the Q3.8 threats and test concept); only the
  ranking is [OPEN]; never invent a target number.
- iso-25010.md: new section distinguishing a literal-threshold scenario
  (fully [ANSWERED], cite file:line) from a mechanism-only one (scenario
  derived, target value [OPEN]); explicit Q3.8 evidence reuse.
- arc42.md: Q3.10 row now defines the Q4 -> Chapter 10 relationship.
- phase-2-synthesize.md: Chapter 10 carve-out — synthesized from the
  [ANSWERED] Q4 scenarios plus the Q4.9 ranking, never just an [OPEN]
  pointer; "No information" only legitimate if Q4 produced no answered
  scenario at all.
- examples.md: added an [ANSWERED] quality-scenario leaf (a literal
  3-second timeout) alongside the existing mechanism/[OPEN]-target pair.

Also fixed the German contract's stop-rule wording to match the EN one
from the LLM-Coding#497 CodeRabbit pass (was still "Stakeholder-Fakt").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Die Pull Request präzisiert die Socratic Code-Theory Recovery Methodik zur Behandlung von Qualitätszielen (Q4): Messbare Qualitätsszenarien aus dem Code werden als [ANSWERED] mit file:line Evidenz dokumentiert; nur die Zielpriorisierung (Q4.9) bleibt [OPEN]. arc42 Kapitel 10 wird aus beantworteten Q4-Szenarien synthetisiert statt als reiner Pointer.

Änderungen

Q4 Qualitätsszenarien und arc42 Kapitel 10 Synthese

Layer / Datei(en) Zusammenfassung
Q4 Qualitätsszenario-Identifikation und Phase-1-Klassifizierung
docs/brownfield-workflow.adoc, docs/brownfield-workflow.de.adoc, plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-1-question-tree.md, skill/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
Phase-1-Dokumentation und Prompts definieren: Messbares Codeverhalten (Timeouts, Limits, Budgets, Retry-Policies, Threat-/Test-Konzepte) wird als [ANSWERED] Qualitätsszenario mit file:line Evidenz dokumentiert; keine erfundenen Zielwerte; nur Q4.9 (Qualitätsziel-Priorisierung) bleibt [OPEN].
arc42 Kapitel 10 Synthese aus Q4-Szenarien und Priorisierung
plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-2-synthesize.md, plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/arc42.md, skill/socratic-code-theory-recovery/prompts/phase-2-synthesize.md, skill/socratic-code-theory-recovery/references/arc42.md
Phase-2-Synthese-Prompts und arc42-Referenzen spezifizieren: Kapitel 10 wird ausschließlich aus beantworteten Q4-Szenarien und Q4.9-Ranking synthetisiert, niemals als reiner [OPEN]-Zeiger; existierende Q3.8-Evidenz wird wiederverwendet (STRIDE T-IDs für Security, Test-Konzepte für Maintainability); Ziel-Ranking darf offen bleiben.
Qualitätsszenario-Formulierungsrichtlinien und Beispiele
plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/iso-25010.md, plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md, skill/socratic-code-theory-recovery/references/iso-25010.md, skill/socratic-code-theory-recovery/references/examples.md
iso-25010 Leitlinien unterscheiden zwischen literalen messbaren Schwellen (vollständig [ANSWERED] mit file:line Zitaten) und Mechanismen ohne Zahlen (Stimulus+Response aus Code, Zielwert [OPEN]); Verbot erfundener Zahlen; Wiederverwendung von Q3.8-Evidenz. Konkrete Inventory-Service-Beispiele (3-Sekunden-Timeout, 409 Conflict) zeigen Code-Evidenz-Format.
Vertrag und öffentliche Anweisungen
website/public/data/contracts.json, website/public/llms.txt
Socratic Code Theory Recovery Vertrag und LLM-Anweisungen werden mit Q4-Regeln ergänzt: Qualitätsszenarien aus messbarem Codeverhalten ableiten; keine erfundenen Zielzahlen; nur Q4.9 als [OPEN]; arc42 Kapitel 10 trägt ableitbare Szenarien statt nur auf [OPEN] zu verweisen.

🎯 2 (Simple) | ⏱️ ~12 Minuten

Möglicherweise relevante Pull Requests

  • LLM-Coding/Semantic-Anchors#478: Verfeinert die gleichen Phase-1/Phase-2-Prompts und Referenzdokumente für Q4 („Quality Scenarios" als [ANSWERED], nur Q4.9 [OPEN], und arc42 Kapitel 10 Synthesisregeln).
  • LLM-Coding/Semantic-Anchors#455: Modifiziert die gleiche Brownfield-Dokumentation zur Socratic Code Theory Recovery; während #455 den Zwei-Phasen-Workflow einführt, erweitert diese PR ihn mit konkreten Q4-Regeln für [ANSWERED] vs. [OPEN] und arc42 Kapitel 10 Synthese.
  • LLM-Coding/Semantic-Anchors#454: PRs aktualisieren beide den Socratic Code Theory Recovery Vertrag in contracts.json (Q4 [ANSWERED]/Q4.9 [OPEN] und arc42 Kapitel 10 Synthese), wobei diese PR auf den existierenden Vertragstext aufbaut.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Der PR-Titel beschreibt präzise die Hauptänderung: Qualitätsszenarios werden statt pauschal als [OPEN] nun systematisch abgeleitet und dokumentiert.
Linked Issues check ✅ Passed Die Änderungen erfüllen alle Anforderungen aus #498: Q4-Szenarien werden als [ANSWERED] mit Codeevidenzen markiert (Timeouts, Limits, Budgets, Q3.8-Threats/Test-Konzept), nur Q4.9-Ranking bleibt [OPEN], Kapitel 10 wird aus abgeleiteten Szenarien synthetisiert statt leer zu bleiben.
Out of Scope Changes check ✅ Passed Alle Änderungen adressieren direkt die Anforderungen aus #498: Promptaktualisierungen, Referenzdokumentation, Kontraktänderungen und Beispiele für Qualitätsszenarios sind alle im Scope der Issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md`:
- Around line 167-176: The fenced code block that begins with "[ANSWERED]" in
the examples.md snippet is missing a language tag (causing MD040); update the
opening fence from ``` to ```text (and ensure the closing fence remains ```), so
the block becomes a ```text fenced code block containing the existing lines
starting with "[ANSWERED]" through "arc42 Chapter 10."

In `@skill/socratic-code-theory-recovery/references/examples.md`:
- Around line 167-176: The Markdown fenced code block containing the
"[ANSWERED]" evidence/performance scenario is missing a language specifier which
triggers MD040; fix it by adding a language tag (e.g., "text" or "md") after the
opening triple backticks for the fenced block that starts with "[ANSWERED]" so
the linter recognizes the fence, leaving the block contents unchanged and
keeping the closing triple backticks intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 0362cd41-9852-4de1-a116-e0cf386b5133

📥 Commits

Reviewing files that changed from the base of the PR and between 6c205ed and b17df6d.

📒 Files selected for processing (14)
  • docs/brownfield-workflow.adoc
  • docs/brownfield-workflow.de.adoc
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/prompts/phase-2-synthesize.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/arc42.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md
  • plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/iso-25010.md
  • skill/socratic-code-theory-recovery/prompts/phase-1-question-tree.md
  • skill/socratic-code-theory-recovery/prompts/phase-2-synthesize.md
  • skill/socratic-code-theory-recovery/references/arc42.md
  • skill/socratic-code-theory-recovery/references/examples.md
  • skill/socratic-code-theory-recovery/references/iso-25010.md
  • website/public/data/contracts.json
  • website/public/llms.txt

Comment on lines +167 to +176
```
[ANSWERED]
Evidence: src/integration/InventoryClient.java:34 (Duration.ofSeconds(3)), src/config/HttpClientConfig.java:19
Performance scenario: when OrderService reserves inventory, the call to
the Inventory service is bounded by a 3-second timeout; on timeout the
order fails with 409 Conflict rather than hanging. The 3-second value is
a literal in the code — a measurable, code-derived target. This is an
[ANSWERED] quality scenario, not an [OPEN] one: the threshold did not
have to be invented or asked of the team. It belongs in arc42 Chapter 10.
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Sprachkennung im Fence ergänzen

In Line 167 startet ein Codeblock ohne Sprachkennung; das triggert MD040. Bitte z. B. text setzen, damit Linting stabil bleibt.

Vorgeschlagener Fix
-```
+```text
 [ANSWERED]
 Evidence: src/integration/InventoryClient.java:34 (Duration.ofSeconds(3)), src/config/HttpClientConfig.java:19
 Performance scenario: when OrderService reserves inventory, the call to
@@
 [ANSWERED] quality scenario, not an [OPEN] one: the threshold did not
 have to be invented or asked of the team. It belongs in arc42 Chapter 10.
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 167-167: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@plugins/semantic-anchors/skills/socratic-code-theory-recovery/references/examples.md`
around lines 167 - 176, The fenced code block that begins with "[ANSWERED]" in
the examples.md snippet is missing a language tag (causing MD040); update the
opening fence from ``` to ```text (and ensure the closing fence remains ```), so
the block becomes a ```text fenced code block containing the existing lines
starting with "[ANSWERED]" through "arc42 Chapter 10."

Comment on lines +167 to +176
```
[ANSWERED]
Evidence: src/integration/InventoryClient.java:34 (Duration.ofSeconds(3)), src/config/HttpClientConfig.java:19
Performance scenario: when OrderService reserves inventory, the call to
the Inventory service is bounded by a 3-second timeout; on timeout the
order fails with 409 Conflict rather than hanging. The 3-second value is
a literal in the code — a measurable, code-derived target. This is an
[ANSWERED] quality scenario, not an [OPEN] one: the threshold did not
have to be invented or asked of the team. It belongs in arc42 Chapter 10.
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Code-Fence in Markdown mit Sprache deklarieren

In Line 167 fehlt die Sprachangabe am Fence (```). Das verursacht den MD040-Hinweis und ist schnell behebbar.

Vorgeschlagener Fix
-```
+```text
 [ANSWERED]
 Evidence: src/integration/InventoryClient.java:34 (Duration.ofSeconds(3)), src/config/HttpClientConfig.java:19
 Performance scenario: when OrderService reserves inventory, the call to
@@
 [ANSWERED] quality scenario, not an [OPEN] one: the threshold did not
 have to be invented or asked of the team. It belongs in arc42 Chapter 10.
-```
+```

Based on learnings, in skill/ sollen Inhalte konsistent als Markdown gepflegt und entsprechend sauber gelintet werden.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
[ANSWERED]
Evidence: src/integration/InventoryClient.java:34 (Duration.ofSeconds(3)), src/config/HttpClientConfig.java:19
Performance scenario: when OrderService reserves inventory, the call to
the Inventory service is bounded by a 3-second timeout; on timeout the
order fails with 409 Conflict rather than hanging. The 3-second value is
a literal in the code — a measurable, code-derived target. This is an
[ANSWERED] quality scenario, not an [OPEN] one: the threshold did not
have to be invented or asked of the team. It belongs in arc42 Chapter 10.
```
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 167-167: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skill/socratic-code-theory-recovery/references/examples.md` around lines 167
- 176, The Markdown fenced code block containing the "[ANSWERED]"
evidence/performance scenario is missing a language specifier which triggers
MD040; fix it by adding a language tag (e.g., "text" or "md") after the opening
triple backticks for the fenced block that starts with "[ANSWERED]" so the
linter recognizes the fence, leaving the block contents unchanged and keeping
the closing triple backticks intact.

@rdmueller rdmueller merged commit f328fc4 into LLM-Coding:main May 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Socratic recovery over-flags arc42 Chapter 10 (Quality) as [OPEN] — split priorities from scenarios

2 participants